home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / TO-3.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  716b  |  26 lines

  1. ' TO-3.BAS
  2. ' This program demonstrates the use of commas with CASE.
  3.  
  4. CLS
  5.  
  6. PRINT "Enter a month, and I will tell you how many"
  7. PRINT "U.S. holidays there are in that month."
  8. INPUT "Please enter a number from 1 to 12:  ", month%
  9. PRINT
  10.  
  11. SELECT CASE month%
  12.     CASE 8
  13.         PRINT "There are no U.S. holidays in that month."
  14.     CASE 3, 4, 7
  15.         PRINT "There is 1 U.S. holiday in that month."
  16.     CASE 6
  17.         PRINT "There are 2 U.S. holidays in that month."
  18.     CASE 1, 2, 9 TO 11
  19.         PRINT "There are 3 U.S. holidays in that month."
  20.     CASE 12
  21.         PRINT "There are 4 U.S. holidays in that month."
  22.     CASE 5
  23.         PRINT "There are 5 U.S. holidays in that month."
  24. END SELECT
  25.  
  26.